{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "name = '600028'\n",
    "datafram = pd.read_csv('../db/%s.csv'%name,sep=',',encoding='utf-8', index_col= 'date')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>price_change</th>\n",
       "      <th>p_change</th>\n",
       "      <th>ma5</th>\n",
       "      <th>ma10</th>\n",
       "      <th>ma20</th>\n",
       "      <th>v_ma5</th>\n",
       "      <th>v_ma10</th>\n",
       "      <th>v_ma20</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>date</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-12-06</th>\n",
       "      <td>5.93</td>\n",
       "      <td>5.94</td>\n",
       "      <td>5.87</td>\n",
       "      <td>5.84</td>\n",
       "      <td>923740.00</td>\n",
       "      <td>-0.10</td>\n",
       "      <td>-1.68</td>\n",
       "      <td>5.964</td>\n",
       "      <td>5.896</td>\n",
       "      <td>5.977</td>\n",
       "      <td>941641.25</td>\n",
       "      <td>786751.53</td>\n",
       "      <td>959076.61</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-12-05</th>\n",
       "      <td>5.96</td>\n",
       "      <td>6.01</td>\n",
       "      <td>5.97</td>\n",
       "      <td>5.94</td>\n",
       "      <td>568682.81</td>\n",
       "      <td>-0.05</td>\n",
       "      <td>-0.83</td>\n",
       "      <td>5.956</td>\n",
       "      <td>5.900</td>\n",
       "      <td>5.996</td>\n",
       "      <td>857818.89</td>\n",
       "      <td>780308.39</td>\n",
       "      <td>947863.84</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-12-04</th>\n",
       "      <td>6.06</td>\n",
       "      <td>6.08</td>\n",
       "      <td>6.02</td>\n",
       "      <td>5.97</td>\n",
       "      <td>911269.81</td>\n",
       "      <td>-0.04</td>\n",
       "      <td>-0.66</td>\n",
       "      <td>5.936</td>\n",
       "      <td>5.898</td>\n",
       "      <td>6.009</td>\n",
       "      <td>854829.41</td>\n",
       "      <td>870721.57</td>\n",
       "      <td>964468.13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-12-03</th>\n",
       "      <td>6.00</td>\n",
       "      <td>6.08</td>\n",
       "      <td>6.06</td>\n",
       "      <td>5.98</td>\n",
       "      <td>1606440.00</td>\n",
       "      <td>0.16</td>\n",
       "      <td>2.71</td>\n",
       "      <td>5.894</td>\n",
       "      <td>5.902</td>\n",
       "      <td>6.026</td>\n",
       "      <td>778759.41</td>\n",
       "      <td>865619.76</td>\n",
       "      <td>969933.51</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-30</th>\n",
       "      <td>5.86</td>\n",
       "      <td>5.92</td>\n",
       "      <td>5.90</td>\n",
       "      <td>5.85</td>\n",
       "      <td>698073.62</td>\n",
       "      <td>0.07</td>\n",
       "      <td>1.20</td>\n",
       "      <td>5.840</td>\n",
       "      <td>5.909</td>\n",
       "      <td>6.039</td>\n",
       "      <td>611044.56</td>\n",
       "      <td>790793.17</td>\n",
       "      <td>940578.95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-29</th>\n",
       "      <td>5.87</td>\n",
       "      <td>5.90</td>\n",
       "      <td>5.83</td>\n",
       "      <td>5.82</td>\n",
       "      <td>504628.19</td>\n",
       "      <td>-0.04</td>\n",
       "      <td>-0.68</td>\n",
       "      <td>5.828</td>\n",
       "      <td>5.924</td>\n",
       "      <td>6.060</td>\n",
       "      <td>631861.81</td>\n",
       "      <td>855707.18</td>\n",
       "      <td>994670.28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-28</th>\n",
       "      <td>5.82</td>\n",
       "      <td>5.89</td>\n",
       "      <td>5.87</td>\n",
       "      <td>5.80</td>\n",
       "      <td>553735.44</td>\n",
       "      <td>0.06</td>\n",
       "      <td>1.03</td>\n",
       "      <td>5.844</td>\n",
       "      <td>5.941</td>\n",
       "      <td>6.081</td>\n",
       "      <td>702797.90</td>\n",
       "      <td>913565.30</td>\n",
       "      <td>1033528.14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-27</th>\n",
       "      <td>5.82</td>\n",
       "      <td>5.85</td>\n",
       "      <td>5.81</td>\n",
       "      <td>5.79</td>\n",
       "      <td>530919.81</td>\n",
       "      <td>0.02</td>\n",
       "      <td>0.34</td>\n",
       "      <td>5.860</td>\n",
       "      <td>5.951</td>\n",
       "      <td>6.103</td>\n",
       "      <td>886613.74</td>\n",
       "      <td>1076021.73</td>\n",
       "      <td>1063195.67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-26</th>\n",
       "      <td>5.75</td>\n",
       "      <td>5.83</td>\n",
       "      <td>5.79</td>\n",
       "      <td>5.71</td>\n",
       "      <td>767865.75</td>\n",
       "      <td>-0.05</td>\n",
       "      <td>-0.86</td>\n",
       "      <td>5.910</td>\n",
       "      <td>5.988</td>\n",
       "      <td>6.128</td>\n",
       "      <td>952480.10</td>\n",
       "      <td>1118665.82</td>\n",
       "      <td>1085940.63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-23</th>\n",
       "      <td>5.88</td>\n",
       "      <td>5.89</td>\n",
       "      <td>5.84</td>\n",
       "      <td>5.83</td>\n",
       "      <td>802159.88</td>\n",
       "      <td>-0.07</td>\n",
       "      <td>-1.18</td>\n",
       "      <td>5.978</td>\n",
       "      <td>6.027</td>\n",
       "      <td>6.150</td>\n",
       "      <td>970541.77</td>\n",
       "      <td>1129203.67</td>\n",
       "      <td>1115674.95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-22</th>\n",
       "      <td>5.96</td>\n",
       "      <td>5.96</td>\n",
       "      <td>5.91</td>\n",
       "      <td>5.89</td>\n",
       "      <td>859308.62</td>\n",
       "      <td>-0.04</td>\n",
       "      <td>-0.67</td>\n",
       "      <td>6.020</td>\n",
       "      <td>6.057</td>\n",
       "      <td>6.171</td>\n",
       "      <td>1079552.55</td>\n",
       "      <td>1131401.69</td>\n",
       "      <td>1141945.79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-21</th>\n",
       "      <td>5.95</td>\n",
       "      <td>5.96</td>\n",
       "      <td>5.95</td>\n",
       "      <td>5.86</td>\n",
       "      <td>1472814.62</td>\n",
       "      <td>-0.11</td>\n",
       "      <td>-1.81</td>\n",
       "      <td>6.038</td>\n",
       "      <td>6.091</td>\n",
       "      <td>6.186</td>\n",
       "      <td>1124332.70</td>\n",
       "      <td>1115419.29</td>\n",
       "      <td>1156556.85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-20</th>\n",
       "      <td>6.10</td>\n",
       "      <td>6.12</td>\n",
       "      <td>6.06</td>\n",
       "      <td>6.01</td>\n",
       "      <td>860251.62</td>\n",
       "      <td>-0.07</td>\n",
       "      <td>-1.14</td>\n",
       "      <td>6.042</td>\n",
       "      <td>6.120</td>\n",
       "      <td>6.198</td>\n",
       "      <td>1265429.72</td>\n",
       "      <td>1058214.68</td>\n",
       "      <td>1164302.49</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-19</th>\n",
       "      <td>6.07</td>\n",
       "      <td>6.14</td>\n",
       "      <td>6.13</td>\n",
       "      <td>6.05</td>\n",
       "      <td>858174.12</td>\n",
       "      <td>0.08</td>\n",
       "      <td>1.32</td>\n",
       "      <td>6.066</td>\n",
       "      <td>6.149</td>\n",
       "      <td>6.207</td>\n",
       "      <td>1284851.55</td>\n",
       "      <td>1074247.27</td>\n",
       "      <td>1181256.07</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-16</th>\n",
       "      <td>6.01</td>\n",
       "      <td>6.08</td>\n",
       "      <td>6.05</td>\n",
       "      <td>6.00</td>\n",
       "      <td>1347213.75</td>\n",
       "      <td>0.05</td>\n",
       "      <td>0.83</td>\n",
       "      <td>6.076</td>\n",
       "      <td>6.168</td>\n",
       "      <td>6.224</td>\n",
       "      <td>1287865.56</td>\n",
       "      <td>1090364.73</td>\n",
       "      <td>1248917.63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-15</th>\n",
       "      <td>5.98</td>\n",
       "      <td>6.01</td>\n",
       "      <td>6.00</td>\n",
       "      <td>5.96</td>\n",
       "      <td>1083209.38</td>\n",
       "      <td>0.03</td>\n",
       "      <td>0.50</td>\n",
       "      <td>6.094</td>\n",
       "      <td>6.195</td>\n",
       "      <td>6.237</td>\n",
       "      <td>1183250.83</td>\n",
       "      <td>1133633.38</td>\n",
       "      <td>1249974.30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-14</th>\n",
       "      <td>6.08</td>\n",
       "      <td>6.08</td>\n",
       "      <td>5.97</td>\n",
       "      <td>5.93</td>\n",
       "      <td>2178299.75</td>\n",
       "      <td>-0.21</td>\n",
       "      <td>-3.40</td>\n",
       "      <td>6.144</td>\n",
       "      <td>6.221</td>\n",
       "      <td>6.247</td>\n",
       "      <td>1106505.89</td>\n",
       "      <td>1153490.99</td>\n",
       "      <td>1266445.86</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-13</th>\n",
       "      <td>6.10</td>\n",
       "      <td>6.20</td>\n",
       "      <td>6.18</td>\n",
       "      <td>6.10</td>\n",
       "      <td>957360.75</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>6.198</td>\n",
       "      <td>6.255</td>\n",
       "      <td>6.272</td>\n",
       "      <td>850999.64</td>\n",
       "      <td>1050369.60</td>\n",
       "      <td>1244268.79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-12</th>\n",
       "      <td>6.13</td>\n",
       "      <td>6.19</td>\n",
       "      <td>6.18</td>\n",
       "      <td>6.10</td>\n",
       "      <td>873244.19</td>\n",
       "      <td>0.04</td>\n",
       "      <td>0.65</td>\n",
       "      <td>6.232</td>\n",
       "      <td>6.268</td>\n",
       "      <td>6.291</td>\n",
       "      <td>863642.99</td>\n",
       "      <td>1053215.45</td>\n",
       "      <td>1253268.67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-09</th>\n",
       "      <td>6.23</td>\n",
       "      <td>6.24</td>\n",
       "      <td>6.14</td>\n",
       "      <td>6.12</td>\n",
       "      <td>824140.06</td>\n",
       "      <td>-0.11</td>\n",
       "      <td>-1.76</td>\n",
       "      <td>6.260</td>\n",
       "      <td>6.273</td>\n",
       "      <td>6.306</td>\n",
       "      <td>892863.89</td>\n",
       "      <td>1102146.24</td>\n",
       "      <td>1253553.07</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-08</th>\n",
       "      <td>6.29</td>\n",
       "      <td>6.31</td>\n",
       "      <td>6.25</td>\n",
       "      <td>6.24</td>\n",
       "      <td>699484.69</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.16</td>\n",
       "      <td>6.296</td>\n",
       "      <td>6.285</td>\n",
       "      <td>6.325</td>\n",
       "      <td>1084015.93</td>\n",
       "      <td>1152489.89</td>\n",
       "      <td>1279661.79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-07</th>\n",
       "      <td>6.31</td>\n",
       "      <td>6.32</td>\n",
       "      <td>6.24</td>\n",
       "      <td>6.22</td>\n",
       "      <td>900768.50</td>\n",
       "      <td>-0.11</td>\n",
       "      <td>-1.73</td>\n",
       "      <td>6.298</td>\n",
       "      <td>6.280</td>\n",
       "      <td>6.332</td>\n",
       "      <td>1200476.09</td>\n",
       "      <td>1197694.40</td>\n",
       "      <td>1339506.31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-06</th>\n",
       "      <td>6.30</td>\n",
       "      <td>6.37</td>\n",
       "      <td>6.35</td>\n",
       "      <td>6.27</td>\n",
       "      <td>1020577.50</td>\n",
       "      <td>0.03</td>\n",
       "      <td>0.47</td>\n",
       "      <td>6.312</td>\n",
       "      <td>6.275</td>\n",
       "      <td>6.354</td>\n",
       "      <td>1249739.56</td>\n",
       "      <td>1270390.30</td>\n",
       "      <td>1347031.29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-05</th>\n",
       "      <td>6.28</td>\n",
       "      <td>6.33</td>\n",
       "      <td>6.32</td>\n",
       "      <td>6.23</td>\n",
       "      <td>1019348.69</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>6.304</td>\n",
       "      <td>6.265</td>\n",
       "      <td>6.369</td>\n",
       "      <td>1242787.90</td>\n",
       "      <td>1288264.88</td>\n",
       "      <td>1395841.91</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-02</th>\n",
       "      <td>6.28</td>\n",
       "      <td>6.32</td>\n",
       "      <td>6.32</td>\n",
       "      <td>6.22</td>\n",
       "      <td>1779900.25</td>\n",
       "      <td>0.06</td>\n",
       "      <td>0.96</td>\n",
       "      <td>6.286</td>\n",
       "      <td>6.279</td>\n",
       "      <td>6.384</td>\n",
       "      <td>1311428.59</td>\n",
       "      <td>1407470.53</td>\n",
       "      <td>1507303.43</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-01</th>\n",
       "      <td>6.30</td>\n",
       "      <td>6.32</td>\n",
       "      <td>6.26</td>\n",
       "      <td>6.22</td>\n",
       "      <td>1281785.50</td>\n",
       "      <td>-0.05</td>\n",
       "      <td>-0.79</td>\n",
       "      <td>6.274</td>\n",
       "      <td>6.278</td>\n",
       "      <td>6.424</td>\n",
       "      <td>1220963.86</td>\n",
       "      <td>1366315.23</td>\n",
       "      <td>1468843.80</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-10-31</th>\n",
       "      <td>6.35</td>\n",
       "      <td>6.36</td>\n",
       "      <td>6.31</td>\n",
       "      <td>6.23</td>\n",
       "      <td>1147085.88</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>6.262</td>\n",
       "      <td>6.273</td>\n",
       "      <td>6.463</td>\n",
       "      <td>1194912.71</td>\n",
       "      <td>1379400.73</td>\n",
       "      <td>1465442.93</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-10-30</th>\n",
       "      <td>6.27</td>\n",
       "      <td>6.37</td>\n",
       "      <td>6.31</td>\n",
       "      <td>6.21</td>\n",
       "      <td>985819.19</td>\n",
       "      <td>0.08</td>\n",
       "      <td>1.28</td>\n",
       "      <td>6.238</td>\n",
       "      <td>6.289</td>\n",
       "      <td>6.501</td>\n",
       "      <td>1291041.04</td>\n",
       "      <td>1438167.98</td>\n",
       "      <td>1521335.20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-10-29</th>\n",
       "      <td>6.32</td>\n",
       "      <td>6.39</td>\n",
       "      <td>6.23</td>\n",
       "      <td>6.20</td>\n",
       "      <td>1362552.12</td>\n",
       "      <td>-0.03</td>\n",
       "      <td>-0.48</td>\n",
       "      <td>6.226</td>\n",
       "      <td>6.313</td>\n",
       "      <td>6.530</td>\n",
       "      <td>1333741.85</td>\n",
       "      <td>1453321.90</td>\n",
       "      <td>1526503.64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-10-26</th>\n",
       "      <td>6.23</td>\n",
       "      <td>6.32</td>\n",
       "      <td>6.26</td>\n",
       "      <td>6.20</td>\n",
       "      <td>1327576.62</td>\n",
       "      <td>0.06</td>\n",
       "      <td>0.97</td>\n",
       "      <td>6.272</td>\n",
       "      <td>6.338</td>\n",
       "      <td>6.566</td>\n",
       "      <td>1503512.47</td>\n",
       "      <td>1404959.91</td>\n",
       "      <td>1521338.55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-06-12</th>\n",
       "      <td>6.33</td>\n",
       "      <td>6.44</td>\n",
       "      <td>6.42</td>\n",
       "      <td>6.33</td>\n",
       "      <td>959063.00</td>\n",
       "      <td>0.08</td>\n",
       "      <td>1.26</td>\n",
       "      <td>6.462</td>\n",
       "      <td>6.681</td>\n",
       "      <td>6.893</td>\n",
       "      <td>906065.73</td>\n",
       "      <td>1045501.44</td>\n",
       "      <td>1267312.83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-06-11</th>\n",
       "      <td>6.45</td>\n",
       "      <td>6.46</td>\n",
       "      <td>6.34</td>\n",
       "      <td>6.31</td>\n",
       "      <td>990020.38</td>\n",
       "      <td>-0.16</td>\n",
       "      <td>-2.46</td>\n",
       "      <td>6.492</td>\n",
       "      <td>6.735</td>\n",
       "      <td>6.930</td>\n",
       "      <td>959678.93</td>\n",
       "      <td>1028066.90</td>\n",
       "      <td>1269785.05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-06-08</th>\n",
       "      <td>6.53</td>\n",
       "      <td>6.58</td>\n",
       "      <td>6.50</td>\n",
       "      <td>6.47</td>\n",
       "      <td>840572.31</td>\n",
       "      <td>-0.02</td>\n",
       "      <td>-0.31</td>\n",
       "      <td>6.632</td>\n",
       "      <td>6.793</td>\n",
       "      <td>6.970</td>\n",
       "      <td>1005087.57</td>\n",
       "      <td>1067981.91</td>\n",
       "      <td>1302224.09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-06-07</th>\n",
       "      <td>6.51</td>\n",
       "      <td>6.54</td>\n",
       "      <td>6.52</td>\n",
       "      <td>6.46</td>\n",
       "      <td>786426.94</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>6.732</td>\n",
       "      <td>6.839</td>\n",
       "      <td>7.007</td>\n",
       "      <td>1018725.50</td>\n",
       "      <td>1108098.26</td>\n",
       "      <td>1301356.63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-06-06</th>\n",
       "      <td>6.55</td>\n",
       "      <td>6.56</td>\n",
       "      <td>6.53</td>\n",
       "      <td>6.46</td>\n",
       "      <td>954246.00</td>\n",
       "      <td>-0.05</td>\n",
       "      <td>-0.76</td>\n",
       "      <td>6.840</td>\n",
       "      <td>6.887</td>\n",
       "      <td>7.045</td>\n",
       "      <td>1181750.29</td>\n",
       "      <td>1134930.89</td>\n",
       "      <td>1328122.95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-06-05</th>\n",
       "      <td>6.65</td>\n",
       "      <td>6.66</td>\n",
       "      <td>6.57</td>\n",
       "      <td>6.51</td>\n",
       "      <td>1227129.00</td>\n",
       "      <td>-0.08</td>\n",
       "      <td>-1.20</td>\n",
       "      <td>6.900</td>\n",
       "      <td>6.936</td>\n",
       "      <td>7.077</td>\n",
       "      <td>1184937.15</td>\n",
       "      <td>1231726.09</td>\n",
       "      <td>1358401.22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-06-04</th>\n",
       "      <td>6.98</td>\n",
       "      <td>7.10</td>\n",
       "      <td>7.04</td>\n",
       "      <td>6.96</td>\n",
       "      <td>1217063.62</td>\n",
       "      <td>0.04</td>\n",
       "      <td>0.57</td>\n",
       "      <td>6.978</td>\n",
       "      <td>7.006</td>\n",
       "      <td>7.103</td>\n",
       "      <td>1096454.87</td>\n",
       "      <td>1219539.59</td>\n",
       "      <td>1387415.08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-06-01</th>\n",
       "      <td>7.00</td>\n",
       "      <td>7.06</td>\n",
       "      <td>7.00</td>\n",
       "      <td>6.94</td>\n",
       "      <td>908761.94</td>\n",
       "      <td>-0.05</td>\n",
       "      <td>-0.71</td>\n",
       "      <td>6.954</td>\n",
       "      <td>7.029</td>\n",
       "      <td>7.109</td>\n",
       "      <td>1130876.25</td>\n",
       "      <td>1365728.83</td>\n",
       "      <td>1410608.45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-31</th>\n",
       "      <td>6.89</td>\n",
       "      <td>7.07</td>\n",
       "      <td>7.06</td>\n",
       "      <td>6.88</td>\n",
       "      <td>1601550.88</td>\n",
       "      <td>0.23</td>\n",
       "      <td>3.37</td>\n",
       "      <td>6.946</td>\n",
       "      <td>7.073</td>\n",
       "      <td>7.109</td>\n",
       "      <td>1197471.01</td>\n",
       "      <td>1523309.36</td>\n",
       "      <td>1414918.05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-30</th>\n",
       "      <td>6.84</td>\n",
       "      <td>6.94</td>\n",
       "      <td>6.83</td>\n",
       "      <td>6.81</td>\n",
       "      <td>970180.31</td>\n",
       "      <td>-0.12</td>\n",
       "      <td>-1.73</td>\n",
       "      <td>6.934</td>\n",
       "      <td>7.078</td>\n",
       "      <td>7.107</td>\n",
       "      <td>1088111.49</td>\n",
       "      <td>1463493.29</td>\n",
       "      <td>1408599.03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-29</th>\n",
       "      <td>6.94</td>\n",
       "      <td>6.99</td>\n",
       "      <td>6.96</td>\n",
       "      <td>6.91</td>\n",
       "      <td>784717.62</td>\n",
       "      <td>0.04</td>\n",
       "      <td>0.58</td>\n",
       "      <td>6.972</td>\n",
       "      <td>7.105</td>\n",
       "      <td>7.109</td>\n",
       "      <td>1278515.02</td>\n",
       "      <td>1489124.22</td>\n",
       "      <td>1405363.42</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-28</th>\n",
       "      <td>6.83</td>\n",
       "      <td>6.93</td>\n",
       "      <td>6.92</td>\n",
       "      <td>6.74</td>\n",
       "      <td>1389170.50</td>\n",
       "      <td>-0.04</td>\n",
       "      <td>-0.57</td>\n",
       "      <td>7.034</td>\n",
       "      <td>7.125</td>\n",
       "      <td>7.106</td>\n",
       "      <td>1342624.30</td>\n",
       "      <td>1511503.20</td>\n",
       "      <td>1443745.82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-25</th>\n",
       "      <td>6.96</td>\n",
       "      <td>6.99</td>\n",
       "      <td>6.96</td>\n",
       "      <td>6.84</td>\n",
       "      <td>1241735.75</td>\n",
       "      <td>-0.04</td>\n",
       "      <td>-0.57</td>\n",
       "      <td>7.104</td>\n",
       "      <td>7.146</td>\n",
       "      <td>7.098</td>\n",
       "      <td>1600581.40</td>\n",
       "      <td>1536466.26</td>\n",
       "      <td>1427571.62</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-24</th>\n",
       "      <td>6.99</td>\n",
       "      <td>7.10</td>\n",
       "      <td>7.00</td>\n",
       "      <td>6.95</td>\n",
       "      <td>1054753.25</td>\n",
       "      <td>-0.01</td>\n",
       "      <td>-0.14</td>\n",
       "      <td>7.200</td>\n",
       "      <td>7.175</td>\n",
       "      <td>7.087</td>\n",
       "      <td>1849147.70</td>\n",
       "      <td>1494615.01</td>\n",
       "      <td>1440135.59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-23</th>\n",
       "      <td>7.24</td>\n",
       "      <td>7.25</td>\n",
       "      <td>7.02</td>\n",
       "      <td>6.99</td>\n",
       "      <td>1922198.00</td>\n",
       "      <td>-0.25</td>\n",
       "      <td>-3.44</td>\n",
       "      <td>7.222</td>\n",
       "      <td>7.202</td>\n",
       "      <td>7.085</td>\n",
       "      <td>1838875.09</td>\n",
       "      <td>1521315.01</td>\n",
       "      <td>1471840.70</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-22</th>\n",
       "      <td>7.27</td>\n",
       "      <td>7.32</td>\n",
       "      <td>7.27</td>\n",
       "      <td>7.22</td>\n",
       "      <td>1105264.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>7.238</td>\n",
       "      <td>7.218</td>\n",
       "      <td>7.075</td>\n",
       "      <td>1699733.41</td>\n",
       "      <td>1485076.34</td>\n",
       "      <td>1432496.83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-21</th>\n",
       "      <td>7.36</td>\n",
       "      <td>7.45</td>\n",
       "      <td>7.27</td>\n",
       "      <td>7.21</td>\n",
       "      <td>2678956.00</td>\n",
       "      <td>-0.16</td>\n",
       "      <td>-2.15</td>\n",
       "      <td>7.216</td>\n",
       "      <td>7.199</td>\n",
       "      <td>7.053</td>\n",
       "      <td>1680382.10</td>\n",
       "      <td>1555290.58</td>\n",
       "      <td>1436935.03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-18</th>\n",
       "      <td>7.11</td>\n",
       "      <td>7.45</td>\n",
       "      <td>7.44</td>\n",
       "      <td>7.08</td>\n",
       "      <td>2484567.25</td>\n",
       "      <td>0.33</td>\n",
       "      <td>4.64</td>\n",
       "      <td>7.188</td>\n",
       "      <td>7.189</td>\n",
       "      <td>7.035</td>\n",
       "      <td>1472351.12</td>\n",
       "      <td>1455488.07</td>\n",
       "      <td>1387238.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-17</th>\n",
       "      <td>7.12</td>\n",
       "      <td>7.17</td>\n",
       "      <td>7.11</td>\n",
       "      <td>7.08</td>\n",
       "      <td>1003390.19</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.14</td>\n",
       "      <td>7.150</td>\n",
       "      <td>7.145</td>\n",
       "      <td>7.005</td>\n",
       "      <td>1140082.31</td>\n",
       "      <td>1306526.75</td>\n",
       "      <td>1348268.39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-16</th>\n",
       "      <td>7.11</td>\n",
       "      <td>7.11</td>\n",
       "      <td>7.10</td>\n",
       "      <td>7.04</td>\n",
       "      <td>1226489.62</td>\n",
       "      <td>-0.06</td>\n",
       "      <td>-0.84</td>\n",
       "      <td>7.182</td>\n",
       "      <td>7.135</td>\n",
       "      <td>6.981</td>\n",
       "      <td>1203754.92</td>\n",
       "      <td>1353704.78</td>\n",
       "      <td>1358283.67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-15</th>\n",
       "      <td>7.17</td>\n",
       "      <td>7.17</td>\n",
       "      <td>7.16</td>\n",
       "      <td>7.08</td>\n",
       "      <td>1008507.44</td>\n",
       "      <td>0.02</td>\n",
       "      <td>0.28</td>\n",
       "      <td>7.198</td>\n",
       "      <td>7.113</td>\n",
       "      <td>6.961</td>\n",
       "      <td>1270419.28</td>\n",
       "      <td>1321602.61</td>\n",
       "      <td>1383873.98</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-14</th>\n",
       "      <td>7.23</td>\n",
       "      <td>7.23</td>\n",
       "      <td>7.13</td>\n",
       "      <td>7.09</td>\n",
       "      <td>1638801.12</td>\n",
       "      <td>-0.12</td>\n",
       "      <td>-1.66</td>\n",
       "      <td>7.182</td>\n",
       "      <td>7.087</td>\n",
       "      <td>6.945</td>\n",
       "      <td>1430199.06</td>\n",
       "      <td>1375988.45</td>\n",
       "      <td>1385299.65</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-11</th>\n",
       "      <td>7.29</td>\n",
       "      <td>7.29</td>\n",
       "      <td>7.25</td>\n",
       "      <td>7.19</td>\n",
       "      <td>823223.19</td>\n",
       "      <td>-0.02</td>\n",
       "      <td>-0.28</td>\n",
       "      <td>7.190</td>\n",
       "      <td>7.049</td>\n",
       "      <td>6.936</td>\n",
       "      <td>1438625.02</td>\n",
       "      <td>1318676.98</td>\n",
       "      <td>1392687.60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-10</th>\n",
       "      <td>7.27</td>\n",
       "      <td>7.32</td>\n",
       "      <td>7.27</td>\n",
       "      <td>7.20</td>\n",
       "      <td>1321753.25</td>\n",
       "      <td>0.08</td>\n",
       "      <td>1.11</td>\n",
       "      <td>7.140</td>\n",
       "      <td>6.999</td>\n",
       "      <td>6.917</td>\n",
       "      <td>1472971.18</td>\n",
       "      <td>1385656.18</td>\n",
       "      <td>1482376.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-09</th>\n",
       "      <td>7.13</td>\n",
       "      <td>7.27</td>\n",
       "      <td>7.18</td>\n",
       "      <td>7.12</td>\n",
       "      <td>1559811.38</td>\n",
       "      <td>0.11</td>\n",
       "      <td>1.56</td>\n",
       "      <td>7.088</td>\n",
       "      <td>6.967</td>\n",
       "      <td>6.892</td>\n",
       "      <td>1503654.63</td>\n",
       "      <td>1422366.39</td>\n",
       "      <td>1515280.31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-08</th>\n",
       "      <td>7.17</td>\n",
       "      <td>7.23</td>\n",
       "      <td>7.08</td>\n",
       "      <td>7.04</td>\n",
       "      <td>1807406.38</td>\n",
       "      <td>-0.10</td>\n",
       "      <td>-1.39</td>\n",
       "      <td>7.028</td>\n",
       "      <td>6.932</td>\n",
       "      <td>6.862</td>\n",
       "      <td>1372785.95</td>\n",
       "      <td>1379917.31</td>\n",
       "      <td>1535947.18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-07</th>\n",
       "      <td>7.04</td>\n",
       "      <td>7.19</td>\n",
       "      <td>7.17</td>\n",
       "      <td>6.98</td>\n",
       "      <td>1680930.88</td>\n",
       "      <td>0.16</td>\n",
       "      <td>2.28</td>\n",
       "      <td>6.992</td>\n",
       "      <td>6.907</td>\n",
       "      <td>6.829</td>\n",
       "      <td>1321777.83</td>\n",
       "      <td>1318579.48</td>\n",
       "      <td>1500399.86</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-04</th>\n",
       "      <td>7.02</td>\n",
       "      <td>7.03</td>\n",
       "      <td>7.00</td>\n",
       "      <td>6.91</td>\n",
       "      <td>994954.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>6.908</td>\n",
       "      <td>6.880</td>\n",
       "      <td>6.790</td>\n",
       "      <td>1198728.95</td>\n",
       "      <td>1318987.94</td>\n",
       "      <td>1478375.58</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-03</th>\n",
       "      <td>6.86</td>\n",
       "      <td>7.04</td>\n",
       "      <td>7.01</td>\n",
       "      <td>6.82</td>\n",
       "      <td>1475170.50</td>\n",
       "      <td>0.14</td>\n",
       "      <td>2.04</td>\n",
       "      <td>6.858</td>\n",
       "      <td>6.865</td>\n",
       "      <td>6.762</td>\n",
       "      <td>1298341.17</td>\n",
       "      <td>1390010.03</td>\n",
       "      <td>1496911.49</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-02</th>\n",
       "      <td>6.89</td>\n",
       "      <td>6.92</td>\n",
       "      <td>6.88</td>\n",
       "      <td>6.81</td>\n",
       "      <td>905468.00</td>\n",
       "      <td>-0.03</td>\n",
       "      <td>-0.43</td>\n",
       "      <td>6.846</td>\n",
       "      <td>6.827</td>\n",
       "      <td>6.736</td>\n",
       "      <td>1341078.15</td>\n",
       "      <td>1362862.56</td>\n",
       "      <td>1492069.80</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>150 rows × 13 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "            open  high  close   low      volume  price_change  p_change  \\\n",
       "date                                                                      \n",
       "2018-12-06  5.93  5.94   5.87  5.84   923740.00         -0.10     -1.68   \n",
       "2018-12-05  5.96  6.01   5.97  5.94   568682.81         -0.05     -0.83   \n",
       "2018-12-04  6.06  6.08   6.02  5.97   911269.81         -0.04     -0.66   \n",
       "2018-12-03  6.00  6.08   6.06  5.98  1606440.00          0.16      2.71   \n",
       "2018-11-30  5.86  5.92   5.90  5.85   698073.62          0.07      1.20   \n",
       "2018-11-29  5.87  5.90   5.83  5.82   504628.19         -0.04     -0.68   \n",
       "2018-11-28  5.82  5.89   5.87  5.80   553735.44          0.06      1.03   \n",
       "2018-11-27  5.82  5.85   5.81  5.79   530919.81          0.02      0.34   \n",
       "2018-11-26  5.75  5.83   5.79  5.71   767865.75         -0.05     -0.86   \n",
       "2018-11-23  5.88  5.89   5.84  5.83   802159.88         -0.07     -1.18   \n",
       "2018-11-22  5.96  5.96   5.91  5.89   859308.62         -0.04     -0.67   \n",
       "2018-11-21  5.95  5.96   5.95  5.86  1472814.62         -0.11     -1.81   \n",
       "2018-11-20  6.10  6.12   6.06  6.01   860251.62         -0.07     -1.14   \n",
       "2018-11-19  6.07  6.14   6.13  6.05   858174.12          0.08      1.32   \n",
       "2018-11-16  6.01  6.08   6.05  6.00  1347213.75          0.05      0.83   \n",
       "2018-11-15  5.98  6.01   6.00  5.96  1083209.38          0.03      0.50   \n",
       "2018-11-14  6.08  6.08   5.97  5.93  2178299.75         -0.21     -3.40   \n",
       "2018-11-13  6.10  6.20   6.18  6.10   957360.75          0.00      0.00   \n",
       "2018-11-12  6.13  6.19   6.18  6.10   873244.19          0.04      0.65   \n",
       "2018-11-09  6.23  6.24   6.14  6.12   824140.06         -0.11     -1.76   \n",
       "2018-11-08  6.29  6.31   6.25  6.24   699484.69          0.01      0.16   \n",
       "2018-11-07  6.31  6.32   6.24  6.22   900768.50         -0.11     -1.73   \n",
       "2018-11-06  6.30  6.37   6.35  6.27  1020577.50          0.03      0.47   \n",
       "2018-11-05  6.28  6.33   6.32  6.23  1019348.69          0.00      0.00   \n",
       "2018-11-02  6.28  6.32   6.32  6.22  1779900.25          0.06      0.96   \n",
       "2018-11-01  6.30  6.32   6.26  6.22  1281785.50         -0.05     -0.79   \n",
       "2018-10-31  6.35  6.36   6.31  6.23  1147085.88          0.00      0.00   \n",
       "2018-10-30  6.27  6.37   6.31  6.21   985819.19          0.08      1.28   \n",
       "2018-10-29  6.32  6.39   6.23  6.20  1362552.12         -0.03     -0.48   \n",
       "2018-10-26  6.23  6.32   6.26  6.20  1327576.62          0.06      0.97   \n",
       "...          ...   ...    ...   ...         ...           ...       ...   \n",
       "2018-06-12  6.33  6.44   6.42  6.33   959063.00          0.08      1.26   \n",
       "2018-06-11  6.45  6.46   6.34  6.31   990020.38         -0.16     -2.46   \n",
       "2018-06-08  6.53  6.58   6.50  6.47   840572.31         -0.02     -0.31   \n",
       "2018-06-07  6.51  6.54   6.52  6.46   786426.94          0.00      0.00   \n",
       "2018-06-06  6.55  6.56   6.53  6.46   954246.00         -0.05     -0.76   \n",
       "2018-06-05  6.65  6.66   6.57  6.51  1227129.00         -0.08     -1.20   \n",
       "2018-06-04  6.98  7.10   7.04  6.96  1217063.62          0.04      0.57   \n",
       "2018-06-01  7.00  7.06   7.00  6.94   908761.94         -0.05     -0.71   \n",
       "2018-05-31  6.89  7.07   7.06  6.88  1601550.88          0.23      3.37   \n",
       "2018-05-30  6.84  6.94   6.83  6.81   970180.31         -0.12     -1.73   \n",
       "2018-05-29  6.94  6.99   6.96  6.91   784717.62          0.04      0.58   \n",
       "2018-05-28  6.83  6.93   6.92  6.74  1389170.50         -0.04     -0.57   \n",
       "2018-05-25  6.96  6.99   6.96  6.84  1241735.75         -0.04     -0.57   \n",
       "2018-05-24  6.99  7.10   7.00  6.95  1054753.25         -0.01     -0.14   \n",
       "2018-05-23  7.24  7.25   7.02  6.99  1922198.00         -0.25     -3.44   \n",
       "2018-05-22  7.27  7.32   7.27  7.22  1105264.00          0.00      0.00   \n",
       "2018-05-21  7.36  7.45   7.27  7.21  2678956.00         -0.16     -2.15   \n",
       "2018-05-18  7.11  7.45   7.44  7.08  2484567.25          0.33      4.64   \n",
       "2018-05-17  7.12  7.17   7.11  7.08  1003390.19          0.01      0.14   \n",
       "2018-05-16  7.11  7.11   7.10  7.04  1226489.62         -0.06     -0.84   \n",
       "2018-05-15  7.17  7.17   7.16  7.08  1008507.44          0.02      0.28   \n",
       "2018-05-14  7.23  7.23   7.13  7.09  1638801.12         -0.12     -1.66   \n",
       "2018-05-11  7.29  7.29   7.25  7.19   823223.19         -0.02     -0.28   \n",
       "2018-05-10  7.27  7.32   7.27  7.20  1321753.25          0.08      1.11   \n",
       "2018-05-09  7.13  7.27   7.18  7.12  1559811.38          0.11      1.56   \n",
       "2018-05-08  7.17  7.23   7.08  7.04  1807406.38         -0.10     -1.39   \n",
       "2018-05-07  7.04  7.19   7.17  6.98  1680930.88          0.16      2.28   \n",
       "2018-05-04  7.02  7.03   7.00  6.91   994954.00          0.00      0.00   \n",
       "2018-05-03  6.86  7.04   7.01  6.82  1475170.50          0.14      2.04   \n",
       "2018-05-02  6.89  6.92   6.88  6.81   905468.00         -0.03     -0.43   \n",
       "\n",
       "              ma5   ma10   ma20       v_ma5      v_ma10      v_ma20  \n",
       "date                                                                 \n",
       "2018-12-06  5.964  5.896  5.977   941641.25   786751.53   959076.61  \n",
       "2018-12-05  5.956  5.900  5.996   857818.89   780308.39   947863.84  \n",
       "2018-12-04  5.936  5.898  6.009   854829.41   870721.57   964468.13  \n",
       "2018-12-03  5.894  5.902  6.026   778759.41   865619.76   969933.51  \n",
       "2018-11-30  5.840  5.909  6.039   611044.56   790793.17   940578.95  \n",
       "2018-11-29  5.828  5.924  6.060   631861.81   855707.18   994670.28  \n",
       "2018-11-28  5.844  5.941  6.081   702797.90   913565.30  1033528.14  \n",
       "2018-11-27  5.860  5.951  6.103   886613.74  1076021.73  1063195.67  \n",
       "2018-11-26  5.910  5.988  6.128   952480.10  1118665.82  1085940.63  \n",
       "2018-11-23  5.978  6.027  6.150   970541.77  1129203.67  1115674.95  \n",
       "2018-11-22  6.020  6.057  6.171  1079552.55  1131401.69  1141945.79  \n",
       "2018-11-21  6.038  6.091  6.186  1124332.70  1115419.29  1156556.85  \n",
       "2018-11-20  6.042  6.120  6.198  1265429.72  1058214.68  1164302.49  \n",
       "2018-11-19  6.066  6.149  6.207  1284851.55  1074247.27  1181256.07  \n",
       "2018-11-16  6.076  6.168  6.224  1287865.56  1090364.73  1248917.63  \n",
       "2018-11-15  6.094  6.195  6.237  1183250.83  1133633.38  1249974.30  \n",
       "2018-11-14  6.144  6.221  6.247  1106505.89  1153490.99  1266445.86  \n",
       "2018-11-13  6.198  6.255  6.272   850999.64  1050369.60  1244268.79  \n",
       "2018-11-12  6.232  6.268  6.291   863642.99  1053215.45  1253268.67  \n",
       "2018-11-09  6.260  6.273  6.306   892863.89  1102146.24  1253553.07  \n",
       "2018-11-08  6.296  6.285  6.325  1084015.93  1152489.89  1279661.79  \n",
       "2018-11-07  6.298  6.280  6.332  1200476.09  1197694.40  1339506.31  \n",
       "2018-11-06  6.312  6.275  6.354  1249739.56  1270390.30  1347031.29  \n",
       "2018-11-05  6.304  6.265  6.369  1242787.90  1288264.88  1395841.91  \n",
       "2018-11-02  6.286  6.279  6.384  1311428.59  1407470.53  1507303.43  \n",
       "2018-11-01  6.274  6.278  6.424  1220963.86  1366315.23  1468843.80  \n",
       "2018-10-31  6.262  6.273  6.463  1194912.71  1379400.73  1465442.93  \n",
       "2018-10-30  6.238  6.289  6.501  1291041.04  1438167.98  1521335.20  \n",
       "2018-10-29  6.226  6.313  6.530  1333741.85  1453321.90  1526503.64  \n",
       "2018-10-26  6.272  6.338  6.566  1503512.47  1404959.91  1521338.55  \n",
       "...           ...    ...    ...         ...         ...         ...  \n",
       "2018-06-12  6.462  6.681  6.893   906065.73  1045501.44  1267312.83  \n",
       "2018-06-11  6.492  6.735  6.930   959678.93  1028066.90  1269785.05  \n",
       "2018-06-08  6.632  6.793  6.970  1005087.57  1067981.91  1302224.09  \n",
       "2018-06-07  6.732  6.839  7.007  1018725.50  1108098.26  1301356.63  \n",
       "2018-06-06  6.840  6.887  7.045  1181750.29  1134930.89  1328122.95  \n",
       "2018-06-05  6.900  6.936  7.077  1184937.15  1231726.09  1358401.22  \n",
       "2018-06-04  6.978  7.006  7.103  1096454.87  1219539.59  1387415.08  \n",
       "2018-06-01  6.954  7.029  7.109  1130876.25  1365728.83  1410608.45  \n",
       "2018-05-31  6.946  7.073  7.109  1197471.01  1523309.36  1414918.05  \n",
       "2018-05-30  6.934  7.078  7.107  1088111.49  1463493.29  1408599.03  \n",
       "2018-05-29  6.972  7.105  7.109  1278515.02  1489124.22  1405363.42  \n",
       "2018-05-28  7.034  7.125  7.106  1342624.30  1511503.20  1443745.82  \n",
       "2018-05-25  7.104  7.146  7.098  1600581.40  1536466.26  1427571.62  \n",
       "2018-05-24  7.200  7.175  7.087  1849147.70  1494615.01  1440135.59  \n",
       "2018-05-23  7.222  7.202  7.085  1838875.09  1521315.01  1471840.70  \n",
       "2018-05-22  7.238  7.218  7.075  1699733.41  1485076.34  1432496.83  \n",
       "2018-05-21  7.216  7.199  7.053  1680382.10  1555290.58  1436935.03  \n",
       "2018-05-18  7.188  7.189  7.035  1472351.12  1455488.07  1387238.00  \n",
       "2018-05-17  7.150  7.145  7.005  1140082.31  1306526.75  1348268.39  \n",
       "2018-05-16  7.182  7.135  6.981  1203754.92  1353704.78  1358283.67  \n",
       "2018-05-15  7.198  7.113  6.961  1270419.28  1321602.61  1383873.98  \n",
       "2018-05-14  7.182  7.087  6.945  1430199.06  1375988.45  1385299.65  \n",
       "2018-05-11  7.190  7.049  6.936  1438625.02  1318676.98  1392687.60  \n",
       "2018-05-10  7.140  6.999  6.917  1472971.18  1385656.18  1482376.15  \n",
       "2018-05-09  7.088  6.967  6.892  1503654.63  1422366.39  1515280.31  \n",
       "2018-05-08  7.028  6.932  6.862  1372785.95  1379917.31  1535947.18  \n",
       "2018-05-07  6.992  6.907  6.829  1321777.83  1318579.48  1500399.86  \n",
       "2018-05-04  6.908  6.880  6.790  1198728.95  1318987.94  1478375.58  \n",
       "2018-05-03  6.858  6.865  6.762  1298341.17  1390010.03  1496911.49  \n",
       "2018-05-02  6.846  6.827  6.736  1341078.15  1362862.56  1492069.80  \n",
       "\n",
       "[150 rows x 13 columns]"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "datafram"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "date\n",
       "2018-12-06   -0.016750\n",
       "2018-12-05   -0.008306\n",
       "2018-12-04   -0.006601\n",
       "2018-12-03    0.027119\n",
       "2018-11-30    0.012007\n",
       "2018-11-29   -0.006814\n",
       "2018-11-28    0.010327\n",
       "2018-11-27    0.003454\n",
       "2018-11-26   -0.008562\n",
       "2018-11-23   -0.011844\n",
       "2018-11-22   -0.006723\n",
       "2018-11-21   -0.018152\n",
       "2018-11-20   -0.011419\n",
       "2018-11-19    0.013223\n",
       "2018-11-16    0.008333\n",
       "2018-11-15    0.005025\n",
       "2018-11-14   -0.033981\n",
       "2018-11-13    0.000000\n",
       "2018-11-12    0.006515\n",
       "2018-11-09   -0.017600\n",
       "2018-11-08    0.001603\n",
       "2018-11-07   -0.017323\n",
       "2018-11-06    0.004747\n",
       "2018-11-05    0.000000\n",
       "2018-11-02    0.009585\n",
       "2018-11-01   -0.007924\n",
       "2018-10-31    0.000000\n",
       "2018-10-30    0.012841\n",
       "2018-10-29   -0.004792\n",
       "2018-10-26    0.009677\n",
       "                ...   \n",
       "2018-06-12    0.012618\n",
       "2018-06-11   -0.024615\n",
       "2018-06-08   -0.003067\n",
       "2018-06-07   -0.001531\n",
       "2018-06-06   -0.006088\n",
       "2018-06-05   -0.066761\n",
       "2018-06-04    0.005714\n",
       "2018-06-01   -0.008499\n",
       "2018-05-31    0.033675\n",
       "2018-05-30   -0.018678\n",
       "2018-05-29    0.005780\n",
       "2018-05-28   -0.005747\n",
       "2018-05-25   -0.005714\n",
       "2018-05-24   -0.002849\n",
       "2018-05-23   -0.034388\n",
       "2018-05-22    0.000000\n",
       "2018-05-21   -0.022849\n",
       "2018-05-18    0.046414\n",
       "2018-05-17    0.001408\n",
       "2018-05-16   -0.008380\n",
       "2018-05-15    0.004208\n",
       "2018-05-14   -0.016552\n",
       "2018-05-11   -0.002751\n",
       "2018-05-10    0.012535\n",
       "2018-05-09    0.014124\n",
       "2018-05-08   -0.012552\n",
       "2018-05-07    0.024286\n",
       "2018-05-04   -0.001427\n",
       "2018-05-03    0.018895\n",
       "2018-05-02         NaN\n",
       "Name: close, Length: 150, dtype: float64"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "returns = (datafram['close'] - datafram['close'].shift(-1)) / datafram['close'].shift(-1)\n",
    "\n",
    "returns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.116638221211 0.012719433879983895 0.0002999269347678182 0.017318398735674676\n"
     ]
    }
   ],
   "source": [
    "max_range = returns.max() - returns.min()\n",
    "mad = returns.mad()\n",
    "var = returns.var()\n",
    "std = returns.std()\n",
    "\n",
    "print(max_range,mad,var,std)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.016750418760469014"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "0.1/5.97"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
